package com.ruoyi.web.controller.assets;

import com.ruoyi.assets.service.IStateAssetService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 资产统计Controller
 * 
 * @author ruoyi
 */
@RestController
@RequestMapping("/assets/statistics")
public class AssetStatisticsController extends BaseController {
    @Autowired
    private IStateAssetService stateAssetService;

    /**
     * 获取资产统计数据
     */
    @PreAuthorize("@ss.hasPermi('assets:statistics:list')")
    @GetMapping("/data")
    public AjaxResult getStatisticsData() {
        Map<String, Object> data = stateAssetService.getAssetStatistics();
        return success(data);
    }
} 